<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Exil:  Fichier source de src/Case.h</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">Exil
   
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Généré par Doxygen 1.7.6.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Recherche');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Page&#160;principale</span></a></li>
      <li><a href="annotated.html"><span>Structures&#160;de&#160;données</span></a></li>
      <li class="current"><a href="files.html"><span>Fichiers</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Recherche" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>Liste&#160;des&#160;fichiers</span></a></li>
      <li><a href="globals.html"><span>Variables&#160;globale</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="headertitle">
<div class="title">src/Case.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="_case_8h.html">Aller à la documentation de ce fichier.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 
<a name="l00008"></a>00008 <span class="preprocessor">#ifndef CASE_H</span>
<a name="l00009"></a>00009 <span class="preprocessor"></span><span class="preprocessor">#define CASE_H</span>
<a name="l00010"></a>00010 <span class="preprocessor"></span>
<a name="l00011"></a>00011 <span class="preprocessor">#include &quot;<a class="code" href="_tab_terrains_8h.html" title="Création et gestion du tableau regroupant les différents types de terrain existant.">TabTerrains.h</a>&quot;</span>
<a name="l00012"></a>00012 <span class="preprocessor">#include &quot;<a class="code" href="_production_8h.html" title="Définit la structure Production.">Production.h</a>&quot;</span>
<a name="l00013"></a>00013 
<a name="l00020"></a><a class="code" href="struct_case_str.html">00020</a> <span class="keyword">struct </span><a class="code" href="struct_case_str.html" title="Informations définissant l&#39;entrepôt.">CaseStr</a>
<a name="l00021"></a>00021 {
<a name="l00022"></a><a class="code" href="struct_case_str.html#a2a7e9dcba70ec8302038448c8e0eae9c">00022</a>    <a class="code" href="struct_terrain.html" title="Informations définissant un type de terrain donné.">Terrain</a> *<a class="code" href="struct_case_str.html#a2a7e9dcba70ec8302038448c8e0eae9c">terrain</a>;    
<a name="l00023"></a><a class="code" href="struct_case_str.html#a9a989c8e6547880101bbc36d027d5442">00023</a>    <a class="code" href="struct_production.html" title="Définition d&#39;une Production.">Production</a> *<a class="code" href="struct_case_str.html#a9a989c8e6547880101bbc36d027d5442">prod</a>;    
<a name="l00024"></a><a class="code" href="struct_case_str.html#ae39d5d53c24127d0380e5d38a25751f4">00024</a>    <span class="keywordtype">char</span> <a class="code" href="struct_case_str.html#ae39d5d53c24127d0380e5d38a25751f4">traversable</a>;    <span class="comment">/*&lt;Si la case peut être traversée par un personnage :</span>
<a name="l00025"></a>00025 <span class="comment">                        booléen grimé en caractère. Une case peut être non</span>
<a name="l00026"></a>00026 <span class="comment">                        traversable soit parce que son terrain ne le permet</span>
<a name="l00027"></a>00027 <span class="comment">                        pas, soit parce qu&#39;il y a déjà quelqu&#39;un sur la case</span>
<a name="l00028"></a>00028 <span class="comment">                        */</span>
<a name="l00029"></a><a class="code" href="struct_case_str.html#af257b9c4306e382b9ca2ae2c122ce0ef">00029</a>    <span class="keywordtype">int</span> <a class="code" href="struct_case_str.html#af257b9c4306e382b9ca2ae2c122ce0ef">nbPers</a>;          
<a name="l00031"></a><a class="code" href="struct_case_str.html#a676e0da0ef83bbbdf42538e54b97506b">00031</a>    <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="struct_case_str.html#a676e0da0ef83bbbdf42538e54b97506b">x</a>;      
<a name="l00032"></a><a class="code" href="struct_case_str.html#ac30de26db5f6d1c18c63913729adca7d">00032</a>    <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="struct_case_str.html#ac30de26db5f6d1c18c63913729adca7d">y</a>;      
<a name="l00033"></a><a class="code" href="struct_case_str.html#a3d99b005d0fb73033dce14d4a135d01f">00033</a>    <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="struct_case_str.html#a3d99b005d0fb73033dce14d4a135d01f">z</a>;      
<a name="l00034"></a><a class="code" href="struct_case_str.html#a5de2d58c20820f718756f480d351fa75">00034</a>    <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="struct_case_str.html#a5de2d58c20820f718756f480d351fa75">xAdj</a>;   
<a name="l00035"></a><a class="code" href="struct_case_str.html#a9f3ba9d7068ba3cb5f22a5de63bcdce9">00035</a>    <span class="keyword">struct </span><a class="code" href="struct_case_str.html" title="Informations définissant l&#39;entrepôt.">CaseStr</a> **<a class="code" href="struct_case_str.html#a9f3ba9d7068ba3cb5f22a5de63bcdce9">casesAdj</a>;   
<a name="l00039"></a>00039 };
<a name="l00040"></a>00040 
<a name="l00041"></a><a class="code" href="_case_8h.html#a00bc1b8159339b1b85790610e6c74185">00041</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct_case_str.html" title="Informations définissant l&#39;entrepôt.">CaseStr</a> <a class="code" href="struct_case_str.html" title="Informations définissant l&#39;entrepôt.">Case</a>;
<a name="l00042"></a>00042 
<a name="l00043"></a>00043 
<a name="l00044"></a>00044 <span class="comment">/*========================== Gestion de la mémoire ==========================*/</span>
<a name="l00051"></a>00051 <span class="keywordtype">void</span> <a class="code" href="_case_8c.html#a3c0ec52b6d3e26f3366179d1a877e978" title="Initialise le contenu d&#39;une Case donnée.">initCase</a>(<a class="code" href="struct_case_str.html" title="Informations définissant l&#39;entrepôt.">Case</a> *pcase, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> xMax, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> yMax, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> zMax);
<a name="l00052"></a>00052 
<a name="l00059"></a>00059 <span class="keywordtype">void</span> <a class="code" href="_case_8c.html#aec63d7137f583fc7764598667a0ee05d" title="Libère une Case.">libereCase</a>(<a class="code" href="struct_case_str.html" title="Informations définissant l&#39;entrepôt.">Case</a> *pcase);
<a name="l00060"></a>00060 
<a name="l00061"></a>00061 <span class="comment">/*============================= Accesseurs =============================*/</span>
<a name="l00067"></a>00067 <a class="code" href="struct_terrain.html" title="Informations définissant un type de terrain donné.">Terrain</a> *<a class="code" href="_case_8c.html#a466cd55d8a427296a02ba2a0da211690" title="Retourne le Terrain de la Case.">getTerrainCase</a>(<span class="keyword">const</span> <a class="code" href="struct_case_str.html" title="Informations définissant l&#39;entrepôt.">Case</a> *pcase);
<a name="l00068"></a>00068 
<a name="l00074"></a>00074 <a class="code" href="struct_production.html" title="Définition d&#39;une Production.">Production</a> *<a class="code" href="_case_8c.html#a9e1d56a2ff4f0ef282ee673409aca1a7" title="Retourne la Production de la Case.">getProdCase</a>(<span class="keyword">const</span> <a class="code" href="struct_case_str.html" title="Informations définissant l&#39;entrepôt.">Case</a> *pcase);
<a name="l00075"></a>00075 
<a name="l00082"></a>00082 <span class="keywordtype">char</span> *<a class="code" href="_case_8c.html#a6011400ea641ce47a31897698c87bc09" title="Retourne le nom de la Production d&#39;une case. Si aucune production, retourne NULL.">getNomProdCase</a>(<span class="keyword">const</span> <a class="code" href="struct_case_str.html" title="Informations définissant l&#39;entrepôt.">Case</a> *pcase);
<a name="l00083"></a>00083 
<a name="l00090"></a>00090 <span class="keywordtype">int</span> <a class="code" href="_case_8c.html#af85219d8e2e440387dfa07ac5190d32b" title="Retourne le pourcentage de la Production d&#39;une case. Si aucune production, retourne -1...">getPourcentageProdCase</a>(<span class="keyword">const</span> <a class="code" href="struct_case_str.html" title="Informations définissant l&#39;entrepôt.">Case</a> *pcase);
<a name="l00091"></a>00091 
<a name="l00098"></a>00098 <span class="keywordtype">int</span> <a class="code" href="_case_8c.html#a7acaa9e20fad38ed2308839697370c07" title="Retourne la vitesse de Production d&#39;une case. Si aucune production, retourne -1.">getVitesseProdCase</a>(<span class="keyword">const</span> <a class="code" href="struct_case_str.html" title="Informations définissant l&#39;entrepôt.">Case</a> *pcase);
<a name="l00099"></a>00099 
<a name="l00105"></a>00105 <span class="keywordtype">int</span> <a class="code" href="_case_8c.html#a7b5213b931c44ed253fe7b097d80eb86" title="Retourne le nombre de personnages présents sur la case.">getNbPersCase</a>(<span class="keyword">const</span> <a class="code" href="struct_case_str.html" title="Informations définissant l&#39;entrepôt.">Case</a> *pcase);
<a name="l00106"></a>00106 
<a name="l00112"></a>00112 <span class="keywordtype">char</span> <a class="code" href="_case_8c.html#a0fa27eea34651eb7e4259dfab4e2833f" title="Retourne la valeur indiquant si la case est traversable.">getTraversableCase</a>(<span class="keyword">const</span> <a class="code" href="struct_case_str.html" title="Informations définissant l&#39;entrepôt.">Case</a> *pcase);
<a name="l00113"></a>00113 
<a name="l00119"></a>00119 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="_case_8c.html#a49e989a28846b9fdf3a91f1dfba280ca" title="Retourne la coordonnée x de la case.">getXCase</a>(<span class="keyword">const</span> <a class="code" href="struct_case_str.html" title="Informations définissant l&#39;entrepôt.">Case</a> *pcase);
<a name="l00120"></a>00120 
<a name="l00126"></a>00126 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="_case_8c.html#a6dd1cf84bb7cea0d9f68c5c9fbc7ed56" title="Retourne la coordonnée y de la case.">getYCase</a>(<span class="keyword">const</span> <a class="code" href="struct_case_str.html" title="Informations définissant l&#39;entrepôt.">Case</a> *pcase);
<a name="l00127"></a>00127 
<a name="l00133"></a>00133 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="_case_8c.html#a2997c46bbe65d4738f7306ac75150df0" title="Retourne la coordonnée z de la case.">getZCase</a>(<span class="keyword">const</span> <a class="code" href="struct_case_str.html" title="Informations définissant l&#39;entrepôt.">Case</a> *pcase);
<a name="l00134"></a>00134 
<a name="l00140"></a>00140 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="_case_8c.html#a269b252f7796b59f6d25eb1854f34743" title="Retourne la taille xAdj du tableau des cases voisines.">getXAdjCase</a>(<span class="keyword">const</span> <a class="code" href="struct_case_str.html" title="Informations définissant l&#39;entrepôt.">Case</a> *pcase);
<a name="l00141"></a>00141 
<a name="l00148"></a>00148 <a class="code" href="struct_case_str.html" title="Informations définissant l&#39;entrepôt.">Case</a> **<a class="code" href="_case_8c.html#a8537f6ae52df290b6fb85b8aed50225e" title="Retourne un pointeur sur le tableau des cases adjacentes à une case dont on aura passé l&#39;adresse...">getCasesAdjCase</a>(<span class="keyword">const</span> <a class="code" href="struct_case_str.html" title="Informations définissant l&#39;entrepôt.">Case</a> *pcase);
<a name="l00149"></a>00149 
<a name="l00150"></a>00150 <span class="comment">/*============================== Mutateurs ==============================*/</span>
<a name="l00157"></a>00157 <span class="keywordtype">void</span> <a class="code" href="_case_8c.html#ae0b64202ed784543f6fe0858c4ab0716" title="Remplace le Terrain de la case par un Terrain donné">setTerrainCase</a>(<a class="code" href="struct_case_str.html" title="Informations définissant l&#39;entrepôt.">Case</a> *pcase, <a class="code" href="struct_terrain.html" title="Informations définissant un type de terrain donné.">Terrain</a> *pterrain);
<a name="l00158"></a>00158 
<a name="l00165"></a>00165 <span class="keywordtype">void</span> <a class="code" href="_case_8c.html#a49ae63a046fefcdaccd6df16f2f1e315" title="Ajoute au nombre de personnages présents sur la case un nombre de personnages donné">ajouteNbPersCase</a>(<a class="code" href="struct_case_str.html" title="Informations définissant l&#39;entrepôt.">Case</a> *pcase, <span class="keywordtype">int</span> varNbPers);
<a name="l00166"></a>00166 
<a name="l00173"></a>00173 <span class="keywordtype">void</span> <a class="code" href="_case_8c.html#a760ba60abe6c291b7445e6379204e547" title="Remplace la valeur indiquant le nombre de personnes sur la case par une valeur donnée.">setNbPersCase</a>(<a class="code" href="struct_case_str.html" title="Informations définissant l&#39;entrepôt.">Case</a> *pcase, <span class="keywordtype">int</span> nouvNbPers);
<a name="l00174"></a>00174 
<a name="l00183"></a>00183 <span class="keywordtype">void</span> <a class="code" href="_case_8c.html#a866980aa704a866ec9141c0fdbf09c1b" title="Remplace la valeur indiquant si une case donnée est traversable par une valeur donnée.">setTraversableCase</a>(<a class="code" href="struct_case_str.html" title="Informations définissant l&#39;entrepôt.">Case</a> *pcase, <span class="keywordtype">char</span> nouvTrav);
<a name="l00184"></a>00184 
<a name="l00194"></a>00194 <span class="keywordtype">void</span> <a class="code" href="_case_8c.html#a9ee9fa6fd926f2e6ed407c38b0d984ea" title="Remplace la production de la case par une nouvelle Production dont le nom aura été donné...">setNouvProdCase</a>(<a class="code" href="struct_case_str.html" title="Informations définissant l&#39;entrepôt.">Case</a> *pcase, <span class="keywordtype">char</span>* nomProd);
<a name="l00195"></a>00195 
<a name="l00203"></a>00203 <span class="keywordtype">void</span> <a class="code" href="_case_8c.html#ad308bc0222a0d0b46798dcbcd7e69f66" title="Remplace le pourcentage de production de la case par une valeur donnée additionnée à la valeur de bas...">ajoutePourcentageProdCase</a>(<a class="code" href="struct_case_str.html" title="Informations définissant l&#39;entrepôt.">Case</a> *pcase, <span class="keywordtype">int</span> pourcent);
<a name="l00204"></a>00204 
<a name="l00212"></a>00212 <span class="keywordtype">void</span> <a class="code" href="_case_8c.html#a55a78ef80106c085f17c580a1ba26046" title="Remplace la vitesse de production de la case par une valeur donnée additionnée à la valeur de base...">ajouteVitesseProdCase</a>(<a class="code" href="struct_case_str.html" title="Informations définissant l&#39;entrepôt.">Case</a> *pcase, <span class="keywordtype">int</span> vitesse);
<a name="l00213"></a>00213 
<a name="l00222"></a>00222 <span class="keywordtype">void</span> <a class="code" href="_case_8c.html#a4483b8a7278db345a49f1ab659088f43" title="Remplace la valeur de la coordonnée X de la case par une valeur donnée après en avoir vérifié la vali...">setXCase</a>(<a class="code" href="struct_case_str.html" title="Informations définissant l&#39;entrepôt.">Case</a> *pcase, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nouvX, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> Xmax);
<a name="l00223"></a>00223 
<a name="l00232"></a>00232 <span class="keywordtype">void</span> <a class="code" href="_case_8c.html#aa2d641b105e9fee14d87b752e9100348" title="Remplace la valeur de la coordonnée Y de la case par une valeur donnée après en avoir vérifié la vali...">setYCase</a>(<a class="code" href="struct_case_str.html" title="Informations définissant l&#39;entrepôt.">Case</a> *pcase, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nouvY, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> Ymax);
<a name="l00233"></a>00233 
<a name="l00242"></a>00242 <span class="keywordtype">void</span> <a class="code" href="_case_8c.html#ab7d7aac6b6edce26f45dfd2c599a8003" title="Remplace la valeur de la coordonnée Z de la case par une valeur donnée après en avoir vérifié la vali...">setZCase</a>(<a class="code" href="struct_case_str.html" title="Informations définissant l&#39;entrepôt.">Case</a> *pcase, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nouvZ, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> Zmax);
<a name="l00243"></a>00243 
<a name="l00250"></a>00250 <span class="keywordtype">void</span> <a class="code" href="_case_8c.html#aa483ca2a96272e6a8df30852bae92244" title="Remplace la valeur de la taille xAdj de la case par une valeur donnée.">setXAdjCase</a>(<a class="code" href="struct_case_str.html" title="Informations définissant l&#39;entrepôt.">Case</a> *pcase, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nouvXAdj);
<a name="l00251"></a>00251 
<a name="l00260"></a>00260 <span class="keywordtype">void</span> <a class="code" href="_case_8c.html#ab6079a61de64bca66286573be2381de8" title="Remplace la valeur de la coordonnée X de la case par une valeur donnée après en avoir vérifié la vali...">setIemeCaseAdjCase</a>(<a class="code" href="struct_case_str.html" title="Informations définissant l&#39;entrepôt.">Case</a> *pcase, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i, <a class="code" href="struct_case_str.html" title="Informations définissant l&#39;entrepôt.">Case</a> *pcaseAdj);
<a name="l00261"></a>00261 
<a name="l00262"></a>00262 <span class="comment">/*========================== Autres fonctions ==========================*/</span>
<a name="l00269"></a>00269 <span class="keywordtype">void</span> <a class="code" href="_case_8c.html#a13945dcd6be8d07c85b03adb5f898365" title="Enlève la production d&#39;une case donnée.">enleveProdCase</a>(<a class="code" href="struct_case_str.html" title="Informations définissant l&#39;entrepôt.">Case</a> *pcase);
<a name="l00270"></a>00270 
<a name="l00271"></a>00271 <span class="comment">/*========================== Fonction de Test ==========================*/</span>
<a name="l00277"></a>00277 <span class="keywordtype">void</span> <a class="code" href="_case_8c.html#a29295e0cb6a89c32ef9ae1ea11698fbb" title="Teste les différentes fonctions du module Case.">testCase</a>();
<a name="l00278"></a>00278 
<a name="l00279"></a>00279 <span class="preprocessor">#endif</span>
</pre></div></div><!-- contents -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>Tout</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Structures de données</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Fichiers</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Fonctions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Définitions de type</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>



<hr class="footer"/><address class="footer"><small>
Généré le Mardi Juin 4 2013 00:35:14 pour Exil par &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.6.1
</small></address>

</body>
</html>
